﻿using Candy.Web.Data;
using System;
using System.Collections.Generic;

namespace Candy.Model
{
    public class DummyDataService : IDataService
    {

        public Web.CandyDataContext DataContext
        {
            get { return null; }
        }

        public Web.Data.ProjectDto LoadedProject
        {
            get { return null; }
        }

        public void LoadProjectListAsync(Action<CandyLoadOperation<Web.Data.ProjectDto>> callback)
        {
     
        }

        public void RefreshFamiliesAsync(Action<CandyLoadOperation<Web.Data.FamilyDto>> callback)
        {
            FamilyDto f1 = new FamilyDto() { Id = 1, Name = "Family1" };
            FamilyDto f2 = new FamilyDto() { Id = 1, Name = "Family2", ParentId = 1 };
            FamilyDto f3 = new FamilyDto() { Id = 1, Name = "Family3", ParentId = 1 };
            List<FamilyDto> ret = new List<FamilyDto>();
            ret.Add(f1);
            ret.Add(f2);
            ret.Add(f3);


            CandyLoadOperation<FamilyDto> op = new CandyLoadOperation<FamilyDto>(ret, null, null);
            callback(op);
        }

        public void LoadGenesAsync(Action<CandyLoadOperation<Web.Data.GeneDto>> callback)
        {

        }

        public void Initialize(ProjectDto project, Action<CandyInvokeOperation<bool>> callback = null)
        {

        }

        public void DeInitialize()
        {
            throw new NotImplementedException();
        }

        public event EventHandler ProjectInitialized;

        public event EventHandler ProjectDeInitialized;


        public void SubmitAsync(Action<CandySubmitOperation> callback)
        {
           
        }


        public void FamilyExistsAsync(int projectId, int selfFamilyId, string familyName, Action<CandyInvokeOperation<bool>> callback)
        {

        }

        public System.ServiceModel.DomainServices.Client.EntitySet<FamilyDto> Families
        {
            get { return new System.ServiceModel.DomainServices.Client.EntitySet<FamilyDto>(); }
        }

        public System.ServiceModel.DomainServices.Client.EntitySet<GeneDto> Genes
        {
            get { return null; }
        }


        public void GeneIdentifierExistsAsync(int projectId, int selfGeneId, string geneIdentifier, Action<CandyInvokeOperation<bool>> callback)
        {
  
        }

        public void GeneNameExistsAsync(int projectId, int selfGeneId, string geneName, Action<CandyInvokeOperation<bool>> callback)
        {

        }


        public System.ServiceModel.DomainServices.Client.EntitySet<GenotypeDto> Genotypes
        {
            get { return null; }
        }


        public void LoadJobsAsync(Action<CandyLoadOperation<BlastJobDto>> callback)
        {
       
        }

        public void RefreshJobsAsync(Action<CandyLoadOperation<BlastJobDto>> callback, IEnumerable<BlastJobDto> jobs)
        {
        
        }


        public void CreateJobAsync(Action<CandyInvokeOperation<List<BlastJobDto>>> callback, BlastJobDefinitionDto val)
        {
        
        }

        public System.ServiceModel.DomainServices.Client.EntitySet<ProjectDto> Projects
        {
            get { return null; }
        }

        public void ProjectExistsAsync(string projectName, Action<CandyInvokeOperation<bool>> callback)
        {

        }

        public void CreateJobsAsync(Action<CandyInvokeOperation<List<BlastJobDto>>> callback, List<BlastJobDefinitionDto> val)
        {

        }


        public void LoadBlastHits(Action<CandyLoadOperation<HitResultDto>> callback, int jobId)
        {
  
        }


        public void LoadBlastHitsAsync(int jobId, Action<CandyLoadOperation<HitResultDto>> callback)
        {

        }


        public void RefreshGenotypes(Action<CandyInvokeOperation> callback)
        {
            throw new NotImplementedException();
        }


        public System.ServiceModel.DomainServices.Client.EntitySet<DatabaseDto> Databases
        {
            get { throw new NotImplementedException(); }
        }


        public void LoadGeneAnnotaionAsync(int geneId, Action<CandyLoadOperation<GeneAnnotationDto>> callback)
        {
            List<GeneAnnotationDto> ret = new List<GeneAnnotationDto>();
            ret.Add(new GeneAnnotationDto()
            {
                 GeneId = geneId,
                  Annotation = AnnotationType.Description,
                 Value = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nibh est, sagittis ac consectetur a, imperdiet eget velit. Duis commodo egestas libero, fringilla aliquam urna blandit sit amet. Nunc nec sagittis quam. Donec vel pulvinar elit. Morbi ligula mauris, ultricies vitae augue at, tempor aliquam augue. Donec vehicula ac diam eu egestas. Integer eget lobortis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium orci quis pulvinar vestibulum. Vestibulum commodo sodales lorem, nec ullamcorper nunc mollis vel. Mauris iaculis faucibus erat, at faucibus lacus blandit sit amet. Nulla facilisi. Etiam viverra purus ac malesuada imperdiet."
            });
            ret.Add(new GeneAnnotationDto()
            {
                GeneId = geneId,
                Annotation = AnnotationType.MolecularFunction,
                Value = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nibh est, sagittis ac consectetur a, imperdiet eget velit. Duis commodo egestas libero, fringilla aliquam urna blandit sit amet. Nunc nec sagittis quam. Donec vel pulvinar elit. Morbi ligula mauris, ultricies vitae augue at, tempor aliquam augue. Donec vehicula ac diam eu egestas. Integer eget lobortis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium orci quis pulvinar vestibulum. Vestibulum commodo sodales lorem, nec ullamcorper nunc mollis vel. Mauris iaculis faucibus erat, at faucibus lacus blandit sit amet. Nulla facilisi. Etiam viverra purus ac malesuada imperdiet."
            });
            ret.Add(new GeneAnnotationDto()
            {
                GeneId = geneId,
                Annotation = AnnotationType.Reference,
                Value = "XEML tool for genrating experiment documentation.\thttp://bing.com"
            });
            callback(new CandyLoadOperation<GeneAnnotationDto>(ret,null, null));

        }


        public System.ServiceModel.DomainServices.Client.EntitySet<GeneAnnotationDto> GeneAnnotations
        {
            get { return new System.ServiceModel.DomainServices.Client.EntitySet<GeneAnnotationDto>(); }
        }


        public System.ServiceModel.DomainServices.Client.EntitySet<PhylogenyDto> Phylogenies
        {
            get { return new System.ServiceModel.DomainServices.Client.EntitySet<PhylogenyDto>(); }
        }

        public void LoadPhylogeniesAsync(int familyId, Action<CandyLoadOperation<PhylogenyDto>> callback)
        {
            List<PhylogenyDto> ret = new List<PhylogenyDto>();
            ret.Add(new PhylogenyDto
            {
                 Name = "Phylogeny A",
                 Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nibh est, sagittis ac consectetur a, imperdiet eget velit. Duis commodo egestas libero, fringilla aliquam urna blandit sit amet. Nunc nec sagittis quam. Donec vel pulvinar elit. Morbi ligula mauris, ultricies vitae augue at, tempor aliquam augue. Donec vehicula ac diam eu egestas. Integer eget lobortis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium orci quis pulvinar vestibulum. Vestibulum commodo sodales lorem, nec ullamcorper nunc mollis vel. Mauris iaculis faucibus erat, at faucibus lacus blandit sit amet. Nulla facilisi. Etiam viverra purus ac malesuada imperdiet."
                 ,Alignment = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nibh est, sagittis ac consectetur a, imperdiet eget velit. Duis commodo egestas libero, fringilla aliquam urna blandit sit amet. Nunc nec sagittis quam. Donec vel pulvinar elit. Morbi ligula mauris, ultricies vitae augue at, tempor aliquam augue. Donec vehicula ac diam eu egestas. Integer eget lobortis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium orci quis pulvinar vestibulum. Vestibulum commodo sodales lorem, nec ullamcorper nunc mollis vel. Mauris iaculis faucibus erat, at faucibus lacus blandit sit amet. Nulla facilisi. Etiam viverra purus ac malesuada imperdiet."
                 ,Tree = "( ( ( ( ( B8XFD2_GIB:0.00000, B8XFD4_GIB:0.00000) :0.00036, B8XFC9_GIB:-0.00036) :0.00035, ( B8XFD0_GIB:-0.00043, ( ( A8DNT2_9HY:0.00117, Q6JIY1_9HY:0.00122) :0.01628, ( D2JM69_9HY:0.08825, ( ( ( D2JM80_9HY:0.01346, D1LC95_9HY:0.02594) :0.16020, Q86ZD5_9HY:0.13312) :0.02275, ( ( ( E7LX60_YEA:-0.02489, ( E7KF94_YEA:-0.00022, ( B5VMP3_YEA:0.00624, C7GND4_YEA:-0.00624) :0.00668) :0.02288) :0.10766, H0GXV6_9SA:0.17388) :0.14420, ( Q2TXK0_ASP:0.38938, ( ( ( ( H9NEK8_9RO:0.16950, I3QK29_9RO:0.16614) :0.11979, H9NEK9_9RO:0.28347) :0.05482, M0YD86_HOR:0.31991) :0.03913, ( ( Q56V25_9CO:0.17243, A0MPB1_9CO:0.18389) :0.01246, ( ( H9BII5_9CO:0.00203, Q6SPR1_9CO:0.00253) :0.16567, Q6B7R0_9CO:0.17616) :0.01425) :0.20145) :0.11143) :0.06626) :0.11245) :0.06350) :0.08923) :0.03460) :0.00036) :0.00208, A8DNS8_9HY:0.00195) :0.00030, ( A8DNT0_9HY:0.00000, A8DNS6_9HY:0.00000) :0.00000, ( A8DNS4_9HY:0.00000, A8DNS2_9HY:0.00000) :0.00000);  "
            });
            ret.Add(new PhylogenyDto
            {
                Name = "Phylogeny B",
                Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nibh est, sagittis ac consectetur a, imperdiet eget velit. Duis commodo egestas libero, fringilla aliquam urna blandit sit amet. Nunc nec sagittis quam. Donec vel pulvinar elit. Morbi ligula mauris, ultricies vitae augue at, tempor aliquam augue. Donec vehicula ac diam eu egestas. Integer eget lobortis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium orci quis pulvinar vestibulum. Vestibulum commodo sodales lorem, nec ullamcorper nunc mollis vel. Mauris iaculis faucibus erat, at faucibus lacus blandit sit amet. Nulla facilisi. Etiam viverra purus ac malesuada imperdiet."
                ,
                Alignment = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nibh est, sagittis ac consectetur a, imperdiet eget velit. Duis commodo egestas libero, fringilla aliquam urna blandit sit amet. Nunc nec sagittis quam. Donec vel pulvinar elit. Morbi ligula mauris, ultricies vitae augue at, tempor aliquam augue. Donec vehicula ac diam eu egestas. Integer eget lobortis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium orci quis pulvinar vestibulum. Vestibulum commodo sodales lorem, nec ullamcorper nunc mollis vel. Mauris iaculis faucibus erat, at faucibus lacus blandit sit amet. Nulla facilisi. Etiam viverra purus ac malesuada imperdiet."
                ,Tree = "( ( ( ( ( B8XFD2_GIB:0.00000, B8XFD4_GIB:0.00000) :0.00036, B8XFC9_GIB:-0.00036) :0.00035, ( B8XFD0_GIB:-0.00043, ( ( A8DNT2_9HY:0.00117, Q6JIY1_9HY:0.00122) :0.01628, ( D2JM69_9HY:0.08825, ( ( ( D2JM80_9HY:0.01346, D1LC95_9HY:0.02594) :0.16020, Q86ZD5_9HY:0.13312) :0.02275, ( ( ( E7LX60_YEA:-0.02489, ( E7KF94_YEA:-0.00022, ( B5VMP3_YEA:0.00624, C7GND4_YEA:-0.00624) :0.00668) :0.02288) :0.10766, H0GXV6_9SA:0.17388) :0.14420, ( Q2TXK0_ASP:0.38938, ( ( ( ( H9NEK8_9RO:0.16950, I3QK29_9RO:0.16614) :0.11979, H9NEK9_9RO:0.28347) :0.05482, M0YD86_HOR:0.31991) :0.03913, ( ( Q56V25_9CO:0.17243, A0MPB1_9CO:0.18389) :0.01246, ( ( H9BII5_9CO:0.00203, Q6SPR1_9CO:0.00253) :0.16567, Q6B7R0_9CO:0.17616) :0.01425) :0.20145) :0.11143) :0.06626) :0.11245) :0.06350) :0.08923) :0.03460) :0.00036) :0.00208, A8DNS8_9HY:0.00195) :0.00030, ( A8DNT0_9HY:0.00000, A8DNS6_9HY:0.00000) :0.00000, ( A8DNS4_9HY:0.00000, A8DNS2_9HY:0.00000) :0.00000);  "

            });

            ret.Add(new PhylogenyDto
            {
                Name = "Phylogeny C",
                Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nibh est, sagittis ac consectetur a, imperdiet eget velit. Duis commodo egestas libero, fringilla aliquam urna blandit sit amet. Nunc nec sagittis quam. Donec vel pulvinar elit. Morbi ligula mauris, ultricies vitae augue at, tempor aliquam augue. Donec vehicula ac diam eu egestas. Integer eget lobortis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium orci quis pulvinar vestibulum. Vestibulum commodo sodales lorem, nec ullamcorper nunc mollis vel. Mauris iaculis faucibus erat, at faucibus lacus blandit sit amet. Nulla facilisi. Etiam viverra purus ac malesuada imperdiet."
                ,
                Alignment = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nibh est, sagittis ac consectetur a, imperdiet eget velit. Duis commodo egestas libero, fringilla aliquam urna blandit sit amet. Nunc nec sagittis quam. Donec vel pulvinar elit. Morbi ligula mauris, ultricies vitae augue at, tempor aliquam augue. Donec vehicula ac diam eu egestas. Integer eget lobortis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus pretium orci quis pulvinar vestibulum. Vestibulum commodo sodales lorem, nec ullamcorper nunc mollis vel. Mauris iaculis faucibus erat, at faucibus lacus blandit sit amet. Nulla facilisi. Etiam viverra purus ac malesuada imperdiet."
                ,Tree = "( ( ( ( ( B8XFD2_GIB:0.00000, B8XFD4_GIB:0.00000) :0.00036, B8XFC9_GIB:-0.00036) :0.00035, ( B8XFD0_GIB:-0.00043, ( ( A8DNT2_9HY:0.00117, Q6JIY1_9HY:0.00122) :0.01628, ( D2JM69_9HY:0.08825, ( ( ( D2JM80_9HY:0.01346, D1LC95_9HY:0.02594) :0.16020, Q86ZD5_9HY:0.13312) :0.02275, ( ( ( E7LX60_YEA:-0.02489, ( E7KF94_YEA:-0.00022, ( B5VMP3_YEA:0.00624, C7GND4_YEA:-0.00624) :0.00668) :0.02288) :0.10766, H0GXV6_9SA:0.17388) :0.14420, ( Q2TXK0_ASP:0.38938, ( ( ( ( H9NEK8_9RO:0.16950, I3QK29_9RO:0.16614) :0.11979, H9NEK9_9RO:0.28347) :0.05482, M0YD86_HOR:0.31991) :0.03913, ( ( Q56V25_9CO:0.17243, A0MPB1_9CO:0.18389) :0.01246, ( ( H9BII5_9CO:0.00203, Q6SPR1_9CO:0.00253) :0.16567, Q6B7R0_9CO:0.17616) :0.01425) :0.20145) :0.11143) :0.06626) :0.11245) :0.06350) :0.08923) :0.03460) :0.00036) :0.00208, A8DNS8_9HY:0.00195) :0.00030, ( A8DNT0_9HY:0.00000, A8DNS6_9HY:0.00000) :0.00000, ( A8DNS4_9HY:0.00000, A8DNS2_9HY:0.00000) :0.00000);  "
            });
            callback(new CandyLoadOperation<PhylogenyDto>(ret,null,null));
        }
    }
}
